<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red">*</a>審核狀態:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-status" data-rule=""  class="form-control selectpicker" name="row[status]" data-rule="required"  onchange="select_status()">
                <option value="3">通過</option>
                <option value="2">拒絕</option>
            </select>
        </div>
    </div>
    <div class="form-group" id="audreason_div" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2"><a style="color: red" >*</a>拒絕原因:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-audreason" data-rule="length(~50)" class="form-control" rows="5" name="row[audreason]" cols="50" placeholder="請填寫拒絕原因"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    
    function select_status() {
        var status=($("#c-status").val());
        if ( status==2 ) {
            $("#audreason_div").show();
        }else{
            $("#audreason_div").hide();
        }
    }
</script>
